credit2: add a callback to migrate to a new cpu
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Wed, 27 Apr 2011 12:36:15 +0000 (13:36 +0100)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Wed, 27 Apr 2011 12:36:15 +0000 (13:36 +0100)
commitff38d3faa7d0e1734237e81c2fea95e18c510dcd
tree7589a305a45183a0eb2b2ba61dbd91276a6dd17f
parent9841d94c95bf97c3cd3c9ca14170fc88dc3b8305
credit2: add a callback to migrate to a new cpu

In credit2, there needs to be a strong correlation between
v->processor and the runqueue to which a vcpu is assigned;
much of the code relies on this invariant.  Allow credit2
to manage the actual migration itself.

This fixes the most recent credit2 bug reported on the list
(Xen BUG at sched_credit2.c:1606) in Xen 4.1, as well as
the bug at sched_credit2.c:811 in -unstable (which catches the
same condition earlier).

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/sched_credit2.c
xen/common/schedule.c
xen/include/xen/sched-if.h